import request from '@/utils/request'

// 查询商品指标数据列表
export function listGoodsIndicators(query) {
  return request({
    url: '/business/goodsIndicators/list',
    method: 'get',
    params: query
  })
}

// 查询商品指标数据详细
export function getGoodsIndicators(id) {
  return request({
    url: '/business/goodsIndicators/' + id,
    method: 'get'
  })
}

// 新增商品指标数据
export function addGoodsIndicators(data) {
  return request({
    url: '/business/goodsIndicators',
    method: 'post',
    data: data
  })
}

// 修改商品指标数据
export function updateGoodsIndicators(data) {
  return request({
    url: '/business/goodsIndicators',
    method: 'put',
    data: data
  })
}

// 删除商品指标数据
export function delGoodsIndicators(ids) {
  return request({
    url: '/business/goodsIndicators/remove',
    method: 'post',
    data: ids
  })
}

// 导出文件
export function exportExcel(data) {
  return request({
    url: '/business/goodsIndicators/export',
    method: 'post',
    data: data
  })
}

// 查询联表查询数据列表(不分页)
export function allList(query) {
  return request({
    url: '/business/goodsIndicators/allList',
    method: 'get',
    params: query
  })
}

// 导出导出无上新日期商品数据文件
export function exportNoUpNewDateExcel() {
  return request({
    url: '/business/goodsIndicators/exportNoUpNewDate',
    method: 'post'
  })
}

// 获取汇总数据
export function getCollectData(query) {
  return request({
    url: '/business/goodsIndicators/getCollectData',
    method: 'get',
    params: query
  })
}

// 查询商品指标上新日期和商品标签
export function getIndicatorsInfo(id) {
  return request({
    url: '/business/goodsIndicators/getIndicatorsInfo/' + id,
    method: 'get'
  })
}

// 修改商品指标上新日期和商品标签
export function editIndicatorsInfo(data) {
  return request({
    url: '/business/goodsIndicators/editIndicatorsInfo',
    method: 'put',
    data: data
  })
}

// 导出产品梯队文件
export function exportProductEchelon(data) {
  return request({
    url: '/business/bulletinBoard/exportProductEchelon',
    method: 'post',
    data: data
  })
}

// 导出产品梯队日期文件
export function exportProductDateEchelon(data) {
  return request({
    url: '/business/bulletinBoard/exportProductDateEchelon',
    method: 'post',
    data: data
  })
}
